cmake_minimum_required(VERSION 2.8)

project(leodriver)

set(CMAKE_BUILD_TYPE Debug)

find_package(catkin REQUIRED COMPONENTS
    roscpp
    std_msgs
    pcl_conversions
    tf
    sensor_msgs
    laser_geometry
)

#set the cmake module paths
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules
                      ${CMAKE_MODULE_PATH})

find_package(OpenCV REQUIRED)
find_package(Qt4 REQUIRED) 
find_package(PCL REQUIRED)

SET(QT_DONT_USE_QTGUI TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
link_directories(/usr/include/qt4/QtExtSerialPort)

catkin_package(
    INCLUDE_DIRS 
)

include_directories(${PCL_INCLUDE_DIRS})

ADD_DEFINITIONS(${QT_DEFINITIONS})

find_package(Qt4 REQUIRED)
#find_package(OpenGL REQUIRED)
#find_package(GLUT REQUIRED)

include_directories(
    ./include
    ${catkin_INCLUDE_DIRS}
#    ${OPENGL_INCLUDE_DIR}
#    ${GLUT_INCLUDE_DIR}
)

set(main_src 
    src/main.cpp
)


#set(gl_src src/glplot.cpp)

add_executable(leodriver ${main_src})
#add_executable(glplot ${gl_src})

target_link_libraries(leodriver
    ${catkin_LIBRARIES}
    ${QT_LIBRARIES}
    -lqextserialport
)

#target_link_libraries(glplot 
#	${catkin_LIBRARIES}
#	${OPENGL_LIBRARIES}
#	${GLUT_LIBRARY}
#)

#message("******Debug output****")
#message(${OPENGL_INCLUDE_DIR})
#message(${GLUT_INCLUDE_DIR})
#message("**********************")
